<template>
    <div>
        <input id="text" type="text" @blur="fun">&emsp;
        <button @click="focusclick">按钮</button>
    </div>
</template>

<script>
    export default {
        name: 'HelloWorld',
        data() {
            return {
                focusState: false,
            }
        },
        methods: {
            focusclick () {
                document.getElementById("text").focus()
            },
            fun(){
                console.log('失去焦点');
            }
        },

    };
</script>


<style scoped>

</style>
